package com.mj.haier.calc.domain;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.data.elasticsearch.annotations.Document;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.Instant;
import java.util.Objects;

/**
 * The ItfOutcomeStatmentDetailBean entity.
 * 安装单对账单明细
 * @author LiJie
 */
@ApiModel(description = "The ItfOutcomeStatmentDetailBean entity. 安装单对账单明细 @author LiJie")
@Entity
@Table(name = "itf_outcome_statment_detail")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "itfoutcomestatmentdetailbean")
public class ItfOutcomeStatmentDetailBean implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 结算单号
     */
    @NotNull
    @ApiModelProperty(value = "结算单号", required = true)
    @Column(name = "doc_no", nullable = false, unique = true)
    private String docNo;

    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    @Column(name = "order_no")
    private String orderNo;

    /**
     * 产品大类
     */
    @ApiModelProperty(value = "产品大类")
    @Column(name = "product_name")
    private String productName;

    /**
     * 产品型号
     */
    @ApiModelProperty(value = "产品型号")
    @Column(name = "product_version")
    private String productVersion;

    /**
     * 产业编码（项目编码）
     */
    @ApiModelProperty(value = "产业编码（项目编码）")
    @Column(name = "source_name_code")
    private String sourceNameCode;

    /**
     * 产业名称（项目名称）
     */
    @ApiModelProperty(value = "产业名称（项目名称）")
    @Column(name = "source_name")
    private String sourceName;

    /**
     * 记账类型
     */
    @ApiModelProperty(value = "记账类型")
    @Column(name = "account_type")
    private String accountType;

    /**
     * 结单日期
     */
    @ApiModelProperty(value = "结单日期")
    @Column(name = "FINISH_DATE")
    private Instant finishInstant;

    /**
     * 配送费（元）
     */
    @ApiModelProperty(value = "配送费（元）")
    @Column(name = "transport_amt", precision = 10)
    private int transportAmt;

    /**
     * 安装费（元）
     */
    @ApiModelProperty(value = "安装费（元）")
    @Column(name = "install_amt", precision = 10)
    private int installAmt;

    /**
     * 长途费（元）
     */
    @ApiModelProperty(value = "长途费（元）")
    @Column(name = "long_distance_amt", precision = 10)
    private int longDistanceAmt;

    /**
     * 操作费
     */
    @ApiModelProperty(value = "操作费")
    @Column(name = "operate_amt")
    private String operateAmt;

    /**
     * 服务方式费
     */
    @ApiModelProperty(value = "服务方式费")
    @Column(name = "service_type_amt")
    private String serviceTypeAmt;

    /**
     * 交通费
     */
    @ApiModelProperty(value = "交通费")
    @Column(name = "traffic_amt")
    private String trafficAmt;

    /**
     * 材料费
     */
    @ApiModelProperty(value = "材料费")
    @Column(name = "meterial_amt")
    private String meterialAmt;

    /**
     * 超长补贴费
     */
    @ApiModelProperty(value = "超长补贴费")
    @Column(name = "subidy_amt")
    private String subidyAmt;

    /**
     * 补偿费
     */
    @ApiModelProperty(value = "补偿费")
    @Column(name = "compensatory_amt")
    private String compensatoryAmt;

    /**
     * 服务奖惩费
     */
    @ApiModelProperty(value = "服务奖惩费")
    @Column(name = "reward_amt")
    private String rewardAmt;

    /**
     * 应付合计（元）
     */
    @ApiModelProperty(value = "应付合计（元）")
    @Column(name = "total_amt", precision = 10)
    private int totalAmt;

    /**
     * 创建日期
     */
    @ApiModelProperty(value = "创建日期")
    @Column(name = "gmt_create")
    private Instant gmtCreate;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDocNo() {
        return docNo;
    }

    public ItfOutcomeStatmentDetailBean docNo(String docNo) {
        this.docNo = docNo;
        return this;
    }

    public void setDocNo(String docNo) {
        this.docNo = docNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public ItfOutcomeStatmentDetailBean orderNo(String orderNo) {
        this.orderNo = orderNo;
        return this;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getProductName() {
        return productName;
    }

    public ItfOutcomeStatmentDetailBean productName(String productName) {
        this.productName = productName;
        return this;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductVersion() {
        return productVersion;
    }

    public ItfOutcomeStatmentDetailBean productVersion(String productVersion) {
        this.productVersion = productVersion;
        return this;
    }

    public void setProductVersion(String productVersion) {
        this.productVersion = productVersion;
    }

    public String getSourceNameCode() {
        return sourceNameCode;
    }

    public ItfOutcomeStatmentDetailBean sourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
        return this;
    }

    public void setSourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
    }

    public String getSourceName() {
        return sourceName;
    }

    public ItfOutcomeStatmentDetailBean sourceName(String sourceName) {
        this.sourceName = sourceName;
        return this;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getAccountType() {
        return accountType;
    }

    public ItfOutcomeStatmentDetailBean accountType(String accountType) {
        this.accountType = accountType;
        return this;
    }

    public void setAccountType(String accountType) {
        this.accountType = accountType;
    }

    public Instant getFinishInstant() {
        return finishInstant;
    }

    public ItfOutcomeStatmentDetailBean finishInstant(Instant finishInstant) {
        this.finishInstant = finishInstant;
        return this;
    }

    public void setFinishInstant(Instant finishInstant) {
        this.finishInstant = finishInstant;
    }

    public int getTransportAmt() {
        return transportAmt;
    }

    public ItfOutcomeStatmentDetailBean transportAmt(int transportAmt) {
        this.transportAmt = transportAmt;
        return this;
    }

    public void setTransportAmt(int transportAmt) {
        this.transportAmt = transportAmt;
    }

    public int getInstallAmt() {
        return installAmt;
    }

    public ItfOutcomeStatmentDetailBean installAmt(int installAmt) {
        this.installAmt = installAmt;
        return this;
    }

    public void setInstallAmt(int installAmt) {
        this.installAmt = installAmt;
    }

    public int getLongDistanceAmt() {
        return longDistanceAmt;
    }

    public ItfOutcomeStatmentDetailBean longDistanceAmt(int longDistanceAmt) {
        this.longDistanceAmt = longDistanceAmt;
        return this;
    }

    public void setLongDistanceAmt(int longDistanceAmt) {
        this.longDistanceAmt = longDistanceAmt;
    }

    public String getOperateAmt() {
        return operateAmt;
    }

    public ItfOutcomeStatmentDetailBean operateAmt(String operateAmt) {
        this.operateAmt = operateAmt;
        return this;
    }

    public void setOperateAmt(String operateAmt) {
        this.operateAmt = operateAmt;
    }

    public String getServiceTypeAmt() {
        return serviceTypeAmt;
    }

    public ItfOutcomeStatmentDetailBean serviceTypeAmt(String serviceTypeAmt) {
        this.serviceTypeAmt = serviceTypeAmt;
        return this;
    }

    public void setServiceTypeAmt(String serviceTypeAmt) {
        this.serviceTypeAmt = serviceTypeAmt;
    }

    public String getTrafficAmt() {
        return trafficAmt;
    }

    public ItfOutcomeStatmentDetailBean trafficAmt(String trafficAmt) {
        this.trafficAmt = trafficAmt;
        return this;
    }

    public void setTrafficAmt(String trafficAmt) {
        this.trafficAmt = trafficAmt;
    }

    public String getMeterialAmt() {
        return meterialAmt;
    }

    public ItfOutcomeStatmentDetailBean meterialAmt(String meterialAmt) {
        this.meterialAmt = meterialAmt;
        return this;
    }

    public void setMeterialAmt(String meterialAmt) {
        this.meterialAmt = meterialAmt;
    }

    public String getSubidyAmt() {
        return subidyAmt;
    }

    public ItfOutcomeStatmentDetailBean subidyAmt(String subidyAmt) {
        this.subidyAmt = subidyAmt;
        return this;
    }

    public void setSubidyAmt(String subidyAmt) {
        this.subidyAmt = subidyAmt;
    }

    public String getCompensatoryAmt() {
        return compensatoryAmt;
    }

    public ItfOutcomeStatmentDetailBean compensatoryAmt(String compensatoryAmt) {
        this.compensatoryAmt = compensatoryAmt;
        return this;
    }

    public void setCompensatoryAmt(String compensatoryAmt) {
        this.compensatoryAmt = compensatoryAmt;
    }

    public String getRewardAmt() {
        return rewardAmt;
    }

    public ItfOutcomeStatmentDetailBean rewardAmt(String rewardAmt) {
        this.rewardAmt = rewardAmt;
        return this;
    }

    public void setRewardAmt(String rewardAmt) {
        this.rewardAmt = rewardAmt;
    }

    public int getTotalAmt() {
        return totalAmt;
    }

    public ItfOutcomeStatmentDetailBean totalAmt(int totalAmt) {
        this.totalAmt = totalAmt;
        return this;
    }

    public void setTotalAmt(int totalAmt) {
        this.totalAmt = totalAmt;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ItfOutcomeStatmentDetailBean itfOutcomeStatmentDetailBean = (ItfOutcomeStatmentDetailBean) o;
        if (itfOutcomeStatmentDetailBean.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), itfOutcomeStatmentDetailBean.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "ItfOutcomeStatmentDetailBean{" +
            "id=" + getId() +
            ", docNo='" + getDocNo() + "'" +
            ", orderNo='" + getOrderNo() + "'" +
            ", productName='" + getProductName() + "'" +
            ", productVersion=" + getProductVersion() +
            ", sourceNameCode='" + getSourceNameCode() + "'" +
            ", sourceName='" + getSourceName() + "'" +
            ", accountType='" + getAccountType() + "'" +
            ", finishInstant='" + getFinishInstant() + "'" +
            ", transportAmt=" + getTransportAmt() +
            ", installAmt=" + getInstallAmt() +
            ", longDistanceAmt=" + getLongDistanceAmt() +
            ", operateAmt='" + getOperateAmt() + "'" +
            ", serviceTypeAmt='" + getServiceTypeAmt() + "'" +
            ", trafficAmt='" + getTrafficAmt() + "'" +
            ", meterialAmt='" + getMeterialAmt() + "'" +
            ", subidyAmt='" + getSubidyAmt() + "'" +
            ", compensatoryAmt='" + getCompensatoryAmt() + "'" +
            ", rewardAmt='" + getRewardAmt() + "'" +
            ", totalAmt=" + getTotalAmt() +
            "}";
    }
}
